package com.wencst.generateJPA.bean;

import java.util.Optional;

/**
 * 数据库列
 * @author wencst
 *
 */
public class ColumnBean {
	/**
	 * 数据库列名
	 */
	private String columnName;
	/**
	 * 数据库列类型
	 */
	private int typeCode;
	/**
	 * 数据库列类型
	 */
	private String columnType;
	/**
	 * 数据库列的长度
	 */
	private int length;
	/**
	 * 对应数据库中的小数点后位数
	 */
	private int decimal;
	/**
	 * 列注释
	 */
	private String comment;
	/**
	 * 列类型转换后的java数据类型
	 */
	private String javaType;
	/**
	 * 列名转换为java字段名
	 */
	private String columnJavaName;
	/**
	 * 是否为主键
	 */
	private boolean isPrimaryKey;
    private boolean nullable;
    private boolean autoIncrement;
    private Optional<String> description = Optional.empty();
	
	public String getColumnName() {
		return columnName;
	}
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	public String getColumnType() {
		return columnType;
	}
	public void setColumnType(String columnType) {
		this.columnType = columnType;
	}
	public int getTypeCode() {
		return typeCode;
	}
	public void setTypeCode(int typeCode) {
		this.typeCode = typeCode;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public int getDecimal() {
		return decimal;
	}
	public void setDecimal(int decimal) {
		this.decimal = decimal;
	}
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	public String getJavaType() {
		return javaType;
	}
	public void setJavaType(String javaType) {
		this.javaType = javaType;
	}
	public String getColumnJavaName() {
		return columnJavaName;
	}
	public void setColumnJavaName(String columnJavaName) {
		this.columnJavaName = columnJavaName;
	}
	public boolean isPrimaryKey() {
		return isPrimaryKey;
	}
	public void setPrimaryKey(boolean isPrimaryKey) {
		this.isPrimaryKey = isPrimaryKey;
	}
	public boolean isNullable() {
		return nullable;
	}
	public void setNullable(boolean nullable) {
		this.nullable = nullable;
	}
	public boolean isAutoIncrement() {
		return autoIncrement;
	}
	public void setAutoIncrement(boolean autoIncrement) {
		this.autoIncrement = autoIncrement;
	}
	public Optional<String> getDescription() {
		return description;
	}
	public void setDescription(Optional<String> description) {
		this.description = description;
	}
	
}
